/*
 * 编译命令 g++ nutArg_demo.cpp -I. -o nutArg_demo.exe -DDEBUG -fexec-charset=GBK
 * 运行命令 .\nutArg_demo.exe -name 靓仔 -number 666
 */
#include <string>
#include "nutArg.h"

class MainParam : public ParamParse {
    
public:
    MainParam(int argc, char* argv[]) : ParamParse(argc, argv) {
        for ( pairParams::iterator it = this->params.begin(); it != this->params.end(); it++ ) {
            PARE_STR(name);
            PARE_INT(number);
        }
    }
    
    std::string name = "Cool man!";
    int number = 123;
};

int main(int argc, char* argv[]) {
    MainParam g_arg(argc, argv);
    printf("Hi \"%s\", Welcome to main_build_test!\n", g_arg.name.c_str());
    printf("And I get number %d.\n", g_arg.number);
    return 0;
}